#include "MainMenuState.h"
#include "StateManager.h"
#include "PlayState.h"
#include "PauseState.h"
#include "Resources.h"

MainMenuState::MainMenuState() { _id = "MainMenuState"; }


MainMenuState::~MainMenuState(void)
{
}

void MainMenuState::update()
{
	if (_inputManager->isKeyPressed(sf::Keyboard::A))
	{
		_stateManager->queueState(new PlayState(), true);
		_stateManager->queueState(new PauseState(), false);
		_stateManager->stateTransition(100, true);
	}
}

void MainMenuState::draw(RenderManager* renderManager)
{
	renderManager->draw(_bg);
}

void MainMenuState::input()
{

}

void MainMenuState::initialize()
{
	_bg.setPosition(0.0f, 0.0f);
	_stateManager->stateTransition(-100, false);
}

void MainMenuState::shutdown()
{

}

void MainMenuState::loadContent()
{
	Resources::getSingletonPtr()->loadSprite(_bg, "MAIN_MENU_TEST");
}

void MainMenuState::unloadContent()
{

}
